package vn.mycrm.client.ui.appointment;

import vn.mycrm.client.model.CuocHen;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.cellview.client.SimplePager.TextLocation;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.cellview.client.DataGrid;
import com.google.gwt.user.datepicker.client.DateBox;
import com.google.gwt.user.client.ui.SuggestBox;

public class LichHen extends Composite{
	
	interface LichHenUiBinder extends UiBinder<Widget, LichHen> {}	
	private static LichHenUiBinder uiBinder = GWT.create(LichHenUiBinder.class);
	
	@UiField SimplePager pager;
	@UiField Button btnNew;
	@UiField HorizontalPanel cmdPanel;
	@UiField(provided=true) DataGrid<CuocHen> dgCuocHen;
	@UiField DateBox dtFromDate;
	@UiField DateBox dtToDate;
	@UiField SuggestBox txtKH;
	
	public LichHen(){
		dgCuocHen = new DataGrid<CuocHen>(CuocHen.KEY_PROVIDER);
		dgCuocHen.setAutoHeaderRefreshDisabled(true);	   
		dgCuocHen.setEmptyTableWidget(new Label("Chưa có dữ liệu"));

	    SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	    pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0, true);
	    pager.setDisplay(dgCuocHen); 	   
	    
	    this.initWidget(uiBinder.createAndBindUi(this));
	}
	
	
}
